package com.ay.demo.akka.share;

import com.ay.demo.akka.msg.Message;

import akka.actor.UntypedActor;

public class ShareActor extends UntypedActor {

	@Override
	public void onReceive(Object msg) throws Exception {
		Message s = null;
		if (msg instanceof Message) {
			s = (Message) msg;
		}
		System.out.println(String.format("ShareActor:%s Thread-%s, Remainder:%d, onReceive, msg:%s", this, Thread.currentThread().getName(), s == null ? 0 : s.getMid() % 4, msg));
	}

}
